A SUIF Java Compiler

نویسنده

  • Holger M. Kienle
چکیده

To compete with optimized C, object-oriented languages need classical optimizations as well as speci c object-oriented optimizations. Therefore, a compiler infrastructure that enables object-oriented compiler research is of great interest for the research community. The SUIF compiler system with the OSUIF extension o ers such a research environment. SUIF de nes an intermediate representation for procedural languages and o ers standard optimization passes. OSUIF extends SUIF with an intermediate representation tailored towards object-oriented languages, hence allowing speci c object-oriented optimizations. To enable Java-related compiler research in (O)SUIF, we have implemented j2s, a Java bytecode front end for the OSUIF/SUIF 2.0 compiler system. Our compiler uses o -line compilation, so that the whole program is known at compile time. Thus, static whole-program optimizations such as class hierarchy analysis and type inference can be implemented with (O)SUIF and applied during the compilation. j2s supports the complete Java Virtual Machine speci cation, except for threads and exception handling, which are currently not supported by the runtime system and (O)SUIF. Because we implemented an o -line compiler, the dynamic loading of classes is also not supported. The compiler is divided into the (O)SUIF front end and the runtime system. The main part of the thesis describes the compilation passes, which consist of Java class loading, resolution of symbolic references in class les, control ow graph generation, data ow analysis to recover lost type information in class les, and nally the actual (O)SUIF code generation. The compiler generates either plain SUIF 2.0 or OSUIF code. Java, in contrast to C, requires a sophisticated runtime system. This thesis contains a detailed description of the interface between j2s and the runtime system; the runtime system itself has been written by Andrew Rutz as part of his Master's thesis. The current version of j2s compiles Java applications that require neither threads nor exception handling during program execution. Despite these restrictions a large number of Java applications compiles and executes. For example, our compiler can handle the transitive closure of the JDK1.2beta2 javac compiler, which consists of 538 Java classes. The javac executable generated with our compiler runs about twice as fast as the JDK1.2beta2 Virtual Machine.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Compiling Java to SUIF: Incorporating Support for Object-Oriented Languages

A primary objective in the SUIF compiler design has been to develop an infrastructure for research in a variety of compiler topics including optimizations on object-oriented languages. However, the task of optimizing object-oriented languages requires that high-level object constructs be visible in SUIF. Java is a statically-typed, object-oriented and interpreted language that has the same requ...

متن کامل

Computer Science Technical Report Compiling Java to SUIF: Incorporating Support for Object-Oriented Languages

A primary objective in the SUIF compiler design has been to develop an infrastructure for research in a variety of compiler topics including optimizations on object-oriented languages. However, the task of optimizing object-oriented languages requires that highlevel object constructs be visible in SUIF. Java is a statically-typed, object-oriented and interpreted language that has the same requi...

متن کامل

One Year Of Experience With SUIF

This paper reports on some recent use of the SUIF compilation suite at Hewlett-Packard Laboratories, Bristol. Our main goal is to provide feedback and suggestions to the SUIF Compiler Group for further improvements, based on our experience across a number of projects.

متن کامل

An Implementation of PostMorph

PostMorph is a tool that converts an executable file into SUIF intermediate format. In the cases where we have an executable program available without the source code or intermediate format code, PostMorph can be used to recover the information needed for compiler optimizations, and bring the program back to the cycle of recompilation and optimization. A primitive version of PostMorph has been ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997